/**
 * 
 */
package de.uni_leipzig.informatik.asv.unsupervised_pos_tagger.datacreation.feature_types;
/**
 * 
 * @author Christoph Teichmann
 * created Jun 3, 2014 3:59:46 PM
 * @version 0.1
 */
public class HyphenFeatures extends GenericFeatureGenerator
{
	/**
	 * @param pairs
	 * @param def
	 */
	public HyphenFeatures()
	{
		super(new String[][] {{"[^\\-]+","NOHYPHEN"},{"\\-+[^\\-]+","STARTHYPHEN"},
									{"[^\\-]+\\-+","ENDHYPHEN"},{"\\-+","ALLHYPHEN"}}, "MIXEDHYPHEN");
	}
	/* (non-Javadoc)
	 * @see de.uni_leipzig.informatik.asv.unsupervised_pos_tagger.datacreation.FeatureType#process(java.lang.String)
	 */
	@Override
	public String process(String s)
	{return s.replaceAll("\\-+", "-");}
	/* (non-Javadoc)
	 * @see de.uni_leipzig.informatik.asv.unsupervised_pos_tagger.datacreation.FeatureType#name()
	 */
	@Override
	public String name()
	{return "HYPHENFEATURE";}
}